package ink.onei.production.vo;

import ink.onei.production.entity.Customer;
import ink.onei.production.entity.Goods;
import ink.onei.production.entity.Order;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

/**
 * @Author: nekotako
 * @Description: TODO
 * @Date: 26/12/2023 21:06 Tuesday
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderDetailVO {
    private Integer id;
    private Integer customerId;
    private Integer goodsId;
    private Integer number;
    private Integer price;
    private String priceUnit;
    private String orderStatus;
    private Timestamp orderDate;
    private Timestamp requiredDate;
    private String requirement;
    private String attachment;

    private String goodsName;
    private String type;
    private String goodsStatus;
    private String goodsIntroduce;
    private String image;

    private String customerName;
    private String fullName;
    private String address;
    private String fax;
    private String mail;
    private String manager;
    private String phone;
    private String customerStatus;
    private String customerIntroduce;

    public Order getOrder() {
        return new Order(this.id, this.customerId, this.goodsId, this.number, this.price, this.priceUnit, this.orderStatus,
                this.orderDate, this.requiredDate, this.requirement, this.attachment);
    }

    public Goods getGoods() {
        return new Goods(this.goodsId, this.goodsName, this.type, this.goodsStatus, this.goodsIntroduce, this.image);
    }

    public Customer getCustomer() {
        return new Customer(this.customerId, this.customerName, this.fullName, this.address, this.fax, this.mail,
                this.manager, this.phone, this.customerStatus, this.customerIntroduce);
    }

}
